package com.wissen.proxy;
/**
 * @author wissen16
 * @param balance current balace
 * class which holds balance for user
 */
public class BankAccount{
	int balance;
	/**
	 * intiate balance value  
	 */
	BankAccount(){
		balance=1000;
	}
	/**
	 * this method withdrawing balance from bank
	 * @param amount current amount to withdraw
	 * @return boolean value on sufficiant balance
	 */
	public boolean withdraw(int amount){
		if(amount>balance)
			return false;
		balance-=amount;
		return true;
	}
	/**
	 * get current balanc of bank
	 * @return current balance
	 */
	int getBalance(){
		return balance;
	}
}
